/*****************************************************************************/
/* File: Panel.h					                                         */
/* Author: rszulgo                                                           */
/*                                                                           */
/* Description:																 */
/* Class for the game panel.												 */
/*****************************************************************************/
#pragma once
#include "Camera.h"
#include "TextControl.h"
#include "Renderer.h"
#include "Font.h"

class CPanel
{
public:
	~CPanel(void);

	static CPanel* GetInstance(CRenderer* pRenderer, HDC hDC, HWND hWnd);
	int Update();
	int Draw();

	void setPlayerOneLife(int iPlayerOneLife) { m_iPlayerOneLife = iPlayerOneLife; }
	void setPlayerOneScore(long int liPlayerOneScore) { m_liPlayerOneScore= liPlayerOneScore; }
	void setPlayerTwoLife(int iPlayerTwoLife) { m_iPlayerTwoLife = iPlayerTwoLife; }
	void setPlayerTwoScore(long int liPlayerTwoScore) { m_liPlayerTwoScore= liPlayerTwoScore; }
#ifdef SHOWFPS
	void setFPS(float fFPS) { m_fFPS = fFPS; }
#endif
	void setCurrentLevel(int iCurrentLevel) { m_iCurrentLevel = iCurrentLevel; }

protected:
	CPanel(CRenderer* pRenderer, HDC hDC, HWND hWnd);	//contructor

private:	
	CRenderer* m_pRenderer;			// pointer to the render device object
	HDC m_hDC;						// pointer to the the device context
	HWND m_hWnd;					// pointer to the main window
	
	CFont* m_pFont;					// the font used to draw text
	
	int m_iPlayerOneLife;			// The current number of player 1 life
	int m_iPlayerTwoLife;			// The current number of player 2 life
	long int m_liPlayerOneScore;	// The current score of player 1
	long int m_liPlayerTwoScore;	// The current score of player 2

	void DrawBoat(int iX, int iY);
#ifdef SHOWFPS
	float m_fFPS;
#endif
	int m_iCurrentLevel;			// The current level


	// The text controls to display the current	information.
	CTextControl* m_pPlayerOneScore;
	CTextControl* m_pPlayerTwoScore;
	CTextControl* m_pPlayerOneLife;
	CTextControl* m_pPlayerTwoLife;
	CTextControl* m_pLevel;

};
